package com.xiaoxi.bms.common.constant.enumeration.statuscode.user;

import com.xiaoxi.bms.common.constant.enumeration.statuscode.ParentEnum;

import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName LoginEnum
 * @Description 登陆会出现问题
 * @Author xiaoxi
 * @Date 2022/4/24 14:47
 * @Version 1.0
 */
public enum LoginUserEnums implements ParentEnum {

    PLEASE_CHECK_YOUR_LOGIN_INFORMATION("A001", "请检查参数"),
    USER_NOT_FOUND("A002", "用户未找到"),
    PASSWORD_MISTAKE("A003", "密码错误"),
    ACCOUNT_LOCKED("A004", "账户已被锁定，请联系管理员"),
    USER_NOT_ENABLED("A005", "用户已停用"),
    PLEASE_REFRESH_AND_RETRY("A006", "请刷新重试"),
    USER_NOT_LOGIN("A007","用户未登录"),
    PASSWORD_EXPIRE("A008","密码已过期"),
    ACCOUNT_DOES_NOT_EXIST("A009","用户已不存在");

    private final String code;
    private final String message;

    LoginUserEnums(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }


    @Override
    public Map<String, String> format() {
        Map<String, String> enumData = new HashMap<>();
        enumData.put("code", this.code);
        enumData.put("message", this.message);
        return enumData;
    }
}
